<?php

namespace app\home\controller\user;

use app\BaseController;
use app\common\model\Notice;

class WebConfig extends BaseController
{

    //获取配置文件
    public function get_config(): string
    {
        $name = $this->request->param('name', '');
        return show(get_config($name));
    }

    //公告
    public function notice_list()
    {
        //获取公告位置
        $id= $this->request->param('id/d',1);
        $map =['status'=>1,'position'=>$id];
        $list = Notice ::where($map)->select();
        $list = $list->hidden(['create_time', 'status', 'position', 'id']);
        show($list);
    }
}